package com.hrms.controller;


import com.hrms.pojo.SysDept;
import com.hrms.pojo.SysRole;
import com.hrms.service.SysDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author LK
 * @since 2021-10-19
 */
@RestController
@RequestMapping("/sys-dept")
public class SysDeptController {
	@Autowired
	SysDeptService sysDeptService;


	@RequestMapping("/list")
	public HashMap<String, Object> rolePage(SysDept a) {
		return sysDeptService.select(a);
	}

	//添加
	@RequestMapping("/add")
	public HashMap<String, Object> add(SysDept a) {
		return sysDeptService.add(a);
	}

	//更新
	@RequestMapping("/update")
	public HashMap<String, Object> update(SysDept a) {
		return sysDeptService.update(a);
	}

	//删除
	@RequestMapping("/del")
	public HashMap<String, Object> update(Integer id) {
		return sysDeptService.del(id);
	}
}


